home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / print / hpgl2ps.zip / README < prev    next >
Text File  |  1989-08-04  |  5KB  |  110 lines

  1. /*  hpgl2ps.pckd  - enhanced version */
  2. /*  hpgl2ps.ucb   - Further enhanced version */
  3.  
  4. There are two filters in this package which are based on the Roland
  5. plotter command set.
  6.  
  7. 1. DXY: A simple command set which is used with all DXY plotters
  8.  
  9. 2. RD-GL: This command set is a superset of the HP (Hewlet Packard)
  10.    graphics language.
  11.  
  12. Not all the commands of DXY or RD-GL (HPGL) are implemented (approx 95%
  13. are) and those commands that are not are skipped and a warning given.
  14. It is very easy to add to this filter if a particular unimplemented
  15. command is desired.
  16.  
  17. If you wish to implement a command go to the relevant portion in the
  18. command switch "dxycom.c" or "hpglcom.c" and call an appropriate user
  19. written procedure.  (You will need a good knowledge of writing
  20. PostScript programs)
  21.  
  22. The filters use the the procedure "getopt" which is used to interpret
  23. command line options and arguments and is normally available on 4.3 bsd
  24. and Sys V Unix. For those sites running 4.1 or 4.2 it may be available
  25. as a local library and must be written into the Makefile.
  26.  
  27. IF YOU DONT HAVE GETOPT YOU WILL HAVE REWRITE THE CODE THAT INTERPRETS
  28. COMMAND LINE OPTIONS AND ARGUMENTS.
  29.  
  30. NOTE 1: The method of writing text is not fully compatible with HPGL
  31. and will be changed at a later date.
  32.  
  33. NOTE 2: The PostScript macros are written into a C procedure to allow
  34. each filter to be a single stand alone program. These macros can easily
  35. be incorporated into other filter programs.
  36.  
  37. I have written some test procedures for the testing of each filter they
  38. are "test1.hpgl" for hpgl2ps and "test1.dxy" for dxy2ps.
  39.  
  40. Don McCormick.
  41.  
  42. -------------------------
  43. Notes on first enhancement:
  44.  
  45. Support for user defined characters added by 
  46. Gerald William Kokodyniak B.A.Sc. M.A.Sc.
  47. University of Toronto, Department of Mechanical Engineering
  48.  
  49. -------------------------
  50. Notes on second enhancement:
  51. Support for Scaling, tickmarks, and better user defined characters
  52. added by Gordon Jacobs, (Ph.D., since we're into titles above)
  53. University of California, Berkeley in July 1989.
  54.  
  55. Mods were made ONLY for the hpgl2ps program and are not guaranteed
  56. to work for dxy2ps.  HP-GL code from the Tektronix DSA 602
  57. Digitizing Signal Analyzer (scope) were used as a test.
  58. Laserwriter output was compared directly with plots from a
  59. HP7550A plotter reading the same HP-GL file.
  60.  
  61. Support for scaling was added.
  62. The Scaling involves re-setting the coordinate
  63. system by re-calculating the XSCALE and YSCALE numbers and adding
  64. an offset to the origin.  The offset had to be added to all files
  65. that make use of the scaling parameters.
  66.  
  67. Tick marks were added with tick.c.  Uses relative draw commands
  68. to make the tick marks and adds two global variables which are
  69. the tick length as a percentage of the overall dimensions.
  70.  
  71. The parser was changed.  The SIGNED_NUMERIC macro recognized a comma
  72. as a valid character which does not make sense.  The HP-GL code from
  73. the DSA 602 often contains a mnemonic followed by a comma, but with
  74. no parameters.  This is valid code although most sources will not
  75. place a comma unless optional parameters actually follow.  The comma
  76. was removed as a valid SIGNED_NUMERIC character and the function
  77. getval() was modified to read all trailing commas and spaces.  In
  78. this way the parser works for both the standard and odd case
  79. mentioned above.
  80.  
  81. The user defined character routine was modified heavily.  Original
  82. function did not take into account the angle of characters.  The
  83. new function reads the current angle of characters and orients
  84. the user defined character in the same way.  The scaling, which was
  85. originally huge for some reason now is dynamically set to a 
  86. proportion of the size of regular text character.  The linewidth
  87. of the user defined character is arbitrarily set to 0.25mm and
  88. then the restored to the previous value.  This width seems to fit
  89. the "linewidth" of the characters in the postscript helvetica
  90. font sized for the DSA 602 output.
  91.  
  92. The default paper size is changed to be 8.5 x 11 inch paper with
  93. command line options added to support all others.
  94.  
  95. The command line options -w and -h were added because the relative
  96. scaling of fonts with the "SR" HP-GL command, while implemented
  97. correctly, gives much smaller character sizes than the HP7550A plotter.
  98. The defaults were set empirically to match plotter output.
  99.  
  100. The sizes in viewport.c were modified to get correct positioning
  101. on the 8.5 x 11 paper when compared to a plot directly from the
  102. HP7550A on the same type of paper.
  103.  
  104. The textps() routine was modified to move the position pointers to
  105. the end of a string when a string is drawn.  This was commented out
  106. in the code that I received, but needed to be restored for the
  107. user defined character to be in the correct place.  The results
  108. match the HP plotter for the same code.
  109. ----------------------
  110.